@import './color.scss';
@import './drawer.scss';
@import './scroll.scss';
@import './statusbar.scss';
@import './transition.scss';
@import '../iconfont/iconfont.css';
@import './markdown-theme/markdown-body.scss';
@import './markdown-theme/github-markdown.css';

* {
	margin: 0;
	padding: 0;
}

:root {
	font-family: Inter, system-ui, Avenir, Helvetica, Arial, sans-serif;
	line-height: 1.5;
	font-weight: 400;

	font-synthesis: none;
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	-webkit-text-size-adjust: 100%;

	color: var(--text-color-2);
}

:focus-visible {
	outline: none !important;
}

body {
	height: 100vh;
	background-color: var(--body-bg-color);
}

.SCSA {
	body {
		transition: background-color var(--SCST);
		* {
			transition: background-color var(--SCST), border-color var(--SCST), box-shadow var(--SCST);
		}
	}
}

#app {
	height: 100%;
	overflow: hidden;
	position: relative;
	.load-fail {
		position: absolute;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
	}
}

/* 文字溢出隐藏 */
.beyond-hiding {
	overflow: hidden; /* 溢出部分隐藏 */
	text-overflow: ellipsis; /* 超出部分省略号表示 */
	white-space: nowrap; /* 防止文本换行 */
	&.rows {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: var(--rows);
	}
}

/* 溢出文字的在左侧显示省略号 */
.beyond-hiding-reverse {
	overflow: hidden; /* 溢出部分隐藏 */
	text-overflow: ellipsis; /* 超出部分省略号表示 */
	white-space: nowrap; /* 防止文本换行 */
	direction: rtl;
	unicode-bidi: bidi-override;
}

/* 设置form-item的label */
.el-form .el-form-item .el-form-item__label {
	color: var(--text-color-4);
	font-size: 13px;
}
.text-button,
.icon-button {
	cursor: pointer;
	user-select: none;
	&:hover {
		color: var(--theme-main-color);
	}
	&.iconfont {
		font-size: inherit;
		&:first-child {
			margin-right: 2px;
		}
		&:last-child {
			margin-left: 2px;
		}
	}
}

// flex 居中
.flex-center {
	display: flex;
	align-items: center;
	justify-content: center;
}
